package com.controller.lx;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.entity.Customer;
import com.entity.Linkman;
import com.service.luo.CusService;

@Controller
public class CustomerController {
	@Autowired
	private CusService customerService;

	/**
	 * 查询客户
	 * @return
	 */
	@PostMapping("/customer_select_")
	@ResponseBody
	public List<Customer> findAll(){
		return customerService.selectCus(new Customer());
	}
	
	/**
	 * 查询客户
	 * @return
	 */
	@PostMapping("/linkman_select_")
	@ResponseBody
	public List<Linkman> findCusLink(@RequestParam("cusno") Long cusno){
		return customerService.findOneCusLink(cusno);
	}
}
